{% extends 'base.html' %}
{% block content %}
<p>{{ count }} books</p>
<ul class="book-list">
    {% for book in books %}
    <li>{{ book.title }} - {{ book.author }}
        <span class="float-right">
            <form class="inline-form" method="post" action="{{ url_for('delete', isbn=book.ISBN) }}">
                <input class="del-btn" type="submit" name="delete" value="Delete" onclick="return confirm('Are you sure?')">
            </form>
            <a class="douban" href="{{ book.link }}" target="_blank" title="Douban">豆瓣</a>
        </span>
    </li>
    {% endfor %}
</ul>
<form method="POST">
    ISBN <input type="text" name="ISBN" autocomplete="off" required>
    <input class="btn" type="submit" name="submit" value="Add">
</form>
{% endblock %}